<?php $this->headStyle()->captureStart()?>
    #content td { padding:5px}
    #content table { border:1px #aaa solid; padding:5px; width:100%}
    #content th {font-weight:bold;}
    #content input {width:140px}
<?php $this->headStyle()->captureEnd()?>
<?php
    if (!isset($_GET['search'])) {$_GET['search'] = '';}
    $get = $_GET; unset($get['page']);
    $pagination = $this->pagination($this->listing_number, $this->page, $this->per_page, 4, $this->geturl('showcomplain', 'comment', null, 'admin1', $get));
?>
<table border="1">
	<tr>
        <th>
            User Name
        </th>
        <th>
            Email
        </th>
        <th>
            Content
        </th>
   </tr>
	<tr>
   		<td>
   			<a href="<?php echo $this->geturl('display', 'comment', null, 'admin1', array('id'=>$this->comment->_id))?>"><?php echo Model_User::find($this->comment->user_id)->username;?></a>
   		</td>
   		<td>
   			<?php echo Model_User::find($this->comment->user_id)->email;?>
   		</td>
   		<td>
   			<?php echo Model_Comment::addface($this->comment->content);?>
   		</td>
   	</tr>
</table>

<table border="1">
	<tr>
		<th>Complain Content</th>
	</tr>
<?php if($this->complain &&  $this->complain->count() == 0):?>
	<tr>
		<td>
			No Complains are defined
		</td>
	</tr>
<?php else:?>
	<?php foreach ($this->complain as $val):?>
	<tr>
		<td><?php echo $val->complain_content;?></td>
	</tr>
	<?php endforeach;?>
<?php endif;?>
</table>
<?php echo $pagination;?>